//==============================================================================
//
// Title:       Screen.c
// Purpose:     A short description of the implementation.
//
// Created on:  13/09/2010 at 16:56:28 by LEGRAND.
// Copyright:   GRPLEG. All Rights Reserved.
//
//==============================================================================

//==============================================================================
// Include files

// include micro abstraction layer

#include "Screen.h"

//==============================================================================
// Constants

//==============================================================================
// Types

//==============================================================================
// Static global variables

//==============================================================================
// Static functions

//==============================================================================
// Global variables

//==============================================================================
// Global functions

TScreen CurrentScreen;


uInt8 Screen_SetCurrent( const TScreen* pScreen )
{


      CurrentScreen.OnInitialize 	=  pScreen->OnInitialize;
      CurrentScreen.ProcessMessage	=  pScreen->ProcessMessage;
      Screen_OnInitialize();


    return 0U ;
}


uInt8 Screen_OnInitialize( void )
{
      if( CurrentScreen.OnInitialize != NUL )
      {
                      CurrentScreen.OnInitialize();
      }

      return 0U;
}

uInt8 Screen_ProcessMessage( TMessage* pMsg )
{
      if( CurrentScreen.ProcessMessage != NUL )
      {
      CurrentScreen.ProcessMessage(pMsg);
      }
      return 0U;
}




uInt8 Screen_SetCurrentScreen( void )
{
  Screen_SetCurrent( &CurrentScreen );

  return 0U ;
}

